﻿@model YogaStudio.Data.Domain.Transcript

@{
    ViewBag.Title = "Register";
}

<h2>Register</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
     
    <div class="form-horizontal">
        @if (Model.Section.Capacity == 0)
        {
            <h4>The Class is full you would like to be added to the waitting list</h4>
        }
        <h4>Transcript</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.TransId)

        <div class="form-group">
            @Html.LabelFor(model => model.Section.Course.CourseName, "Course Name", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Section.Course.CourseName, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.Section.Course.CourseName, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Customer.FullName, "Customer Name", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Customer.User.UserName, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.Customer.FullName, "", new { @class = "text-danger" })
            </div>
        </div>


        <div class="form-group">
            @Html.LabelFor(model => model.CourseDate, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model =>model.Section.Schedule.FromDate, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.CourseDate, "", new { @class = "text-danger" })
            </div>
        </div>
        
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                @if (Model.Section.Capacity > 0)
                {
                    @Html.ActionLink("Contiue", "PaymentForCourse", "Sections", new {id = Model.SectionId}, null)
                }
                else
                {
                    @Html.ActionLink("Waiting List", "AddToWaittingList", "Sections", new {id = Model.SectionId}, null)
                        
                }
            </div>
        </div>
        
    </div>
}

<div>
    @Html.ActionLink("Back to List", "CustomerIndex")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
